<?php
/*
 *
 *
 *
 *
 *
 */

defined('_VALID_MOS') or defined('_JEXEC') or die('Direct Access to this location is not allowed.');
/*  WEB SITE: http://fancy.klade.lv/howto */


// * 11.02.2010 Updated to FanceBox V1.3
/*
	API: http://fancybox.net/api
	
	Method  					Description
---------------------------------------------------------------------------------------------
	$.fancybox.showActivity 	Shows loading animation
	$.fancybox.hideActivity 	Hides loading animation
	$.fancybox.next 			Displays the next gallery item
	$.fancybox.prev 			Displays the previous gallery item
	$.fancybox.pos				Displays item by index from gallery
	$.fancybox.cancel			Cancels loading content
	$.fancybox.close			Hides FancyBox
								Within an iframe use - parent.$.fancybox.close();
	$.fancybox.resize			Auto-resizes FancyBox height to match height of content
	$.fancybox.center			Centers FancyBox in viewport
	
	OPTIONS: You can pass options as key/value object to fancybox() function or modify them at the bottom of FancyBox JS file
---------------------------------------------------------------------------------------------
	Key 				Default value 	Description
---------------------------------------------------------------------------------------------
	padding 			10 				Space between FancyBox wrapper and content
	margin 				20 				Space between viewport and FancyBox wrapper
	opacity 			false 			When true, transparency of content is changed for elastic transitions
	modal 				false 			When true, 'overlayShow' is set to 'true' and 'hideOnOverlayClick', 'hideOnContentClick', 'enableEscapeButton', 'showCloseButton' are set to 'false'
	cyclic 				false 			When true, galleries will be cyclic, allowing you to keep pressing next/back.
	scrolling 			'auto' 			Set the overflow CSS property to create or hide scrollbars. Can be set to 'auto', 'yes', or 'no'
	width 				560 			Width for content types 'iframe' and 'swf'. Also set for inline content if 'autoDimensions' is set to 'false'
	height 				340 			Height for content types 'iframe' and 'swf'. Also set for inline content if 'autoDimensions' is set to 'false'
	autoScale 			true 			If true, FancyBox is scaled to fit in viewport
	autoDimensions 		true 			For inline and ajax views, resizes the view to the element recieves. Make sure it has dimensions otherwise this will give unexpected results
	centerOnScroll 		false 			When true, FancyBox is centered while scrolling page
	ajax 				{ } 			Ajax options (error, success will be overwritten)
	swf 				{wmode: 'transparent'} 	Flashvars to put on the swf object
	hideOnOverlayClick 	true 			Toggle if clicking the overlay should close FancyBox
	hideOnContentClick 	false 			Toggle if clicking the content should close FancyBox
	overlayShow 		true 			Toggle overlay
	overlayOpacity 		0.3 			Opacity of the overlay (from 0 to 1; default - 0.3)
	overlayColor 		'#666' 			Color of the overlay
	titleShow 			true 			Toggle title
	titlePosition 		'outside' 		The position of title. Can be set to 'outside', 'inside' or 'over'
	titleFormat 		null 			Callback to customize title area. You can set any html - custom image counter or even custom navigation
	transitionIn, 
	transitionOut 		'fade' 			The transition type. Can be set to 'elastic', 'fade' or 'none'
	speedIn,
	speedOut 			300 			Speed of the fade and elastic transitions, in milliseconds
	changeSpeed 		300 			Speed of resizing when changing gallery items, in milliseconds
	changeFade 			'fast' 			Speed of the content fading while changing gallery items
	easingIn, 
	easingOut 			'swing' 		Easing used for elastic animations
	showCloseButton 	true 			Toggle close button
	showNavArrows 		true 			Toggle navigation arrows
	enableEscapeButton 	true 			Toggle if pressing Esc button closes FancyBox
	onStart 			null 			Will be called right before attempting to load the content
	onCancel 			null 			Will be called after loading is canceled
	onComplete 			null 			Will be called once the content is displayed
	onCleanup 			null 			Will be called just before closing
	onClosed 			null 			Will be called once FancyBox is closed
	
	ADVANCED OPTIONS
---------------------------------------------------------------------------------------------
	Key 		Description
---------------------------------------------------------------------------------------------
	href 		Forces content source
	type 		Forces content type. Can be set to 'image', 'ajax', 'iframe', 'swf' or 'inline'
	content 	Forces content (can be any html data)
	orig 		Sets object whos position and dimensions will be used by 'elastic' transition
	
*/


/*
-- Available options --
You can pass them as shown above or modify them at the bottom of FancyBox JS file

padding 							Padding around content
imageScale 							If true, images are scaled to fit in viewport
zoomOpacity 						If true, changes content transparency when animating
zoomSpeedIn 						Speed in miliseconds of the zooming-in animation (no animation if 0)
zoomSpeedOut 						Speed in miliseconds of the zooming-out animation (no animation if 0)
zoomSpeedChange 					Speed in miliseconds of the animation when changing gallery items (no animation if 0)
easingIn, easingOut, easingChange 	Easing used for animations
frameWidth 							Default width for iframed and inline content
frameHeight 						Default height for iframed and inline content
overlayShow 						If true, shows the overlay (false by default). 
									Overlay color is defined in CSS file
overlayOpacity 						Opacity of overlay (from 0 to 1)
hideOnContentClick 					Hides FancyBox when cliked on opened item
centerOnScroll 						If true, content is centered when user scrolls page
itemArray 							Optional, can set custom item array
callbackOnStart 					Optional, called on start
callbackOnShow 						Optional, called on displaying content
callbackOnClose 					Optional, called on close

Optional: 
	Use the title attribute if you want to show a caption
Note:
	You may want to set hideOnContentClick to false if you display iframed or inline content and 
	it containts clickable elements (for example - play buttons for movies, links to other pages)

For images:
<a id="single_image" href="image_big.jpg"><img src="image_small.jpg" alt=""/></a>
*/

$app = &JTuneConfig::getApplication();
$plugin_path = TG_PLUGINSWAY.'fancybox/';

$text = '<link type="text/css" href="'.$plugin_path.'css/jquery.fancybox-1.3.0.css" rel="stylesheet" media="screen" />';
$app->addCustomHeadTag( $text );

$text = '<script type="text/javascript" src="'.$plugin_path.'js/jquery.fancybox-1.3.0.pack.js"></script>';
$app->addCustomHeadTag( $text );
?>